﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="PageChangingEventArgs.cs" company="XamlNinja">
//   2011 Richard Griffin and Ollie Riches
// </copyright>
// <summary>
//   Used by implementations of IPagedCollectionView interface, allows the cancelling of the page change request.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace WP7Contrib.Collections
{
    using System.ComponentModel;

    /// <summary>
    /// Used by implementations of IPagedCollectionView interface, allows the cancelling of the page change request.
    /// </summary>
    public sealed class PageChangingEventArgs : CancelEventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PageChangingEventArgs"/> class.
        /// </summary>
        /// <param name="pageIndex">
        /// The page index.
        /// </param>
        public PageChangingEventArgs(int pageIndex)
        {
            this.PageIndex = pageIndex;
        }

        /// <summary>
        /// Gets the current page index.
        /// </summary>
        public int PageIndex { get; private set; }
    }
}